package cn.sumpu.app.coolsk.dao;

import java.util.*;
import cn.sumpu.app.coolsk.domain.*;
import cn.sumpu.app.coolsk.exception.AppBusinessException;

public interface ContentDao {

	/**
	 * author BruceZhang
	 * @param content
	 * 添加内容
	 * @throws AppBusinessException
	 */
	void addContent(Content content)throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param id
	 * 删除内容
	 * @throws AppBusinessException
	 */
	void deleteContent(String id)throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param content
	 * 更新内容
	 * @throws AppBusinessException
	 */
	void updateContent(Content content)throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param channel	频道号
	 * @return	通过频道查询最小的排序号
	 * @throws AppBusinessException
	 */
	Integer getMinSortByChannel(String channel)throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param map
	 * @return	根据条件查询排序内容
	 * @throws AppBusinessException
	 */
	Content getSortByCondition(Map<String, Object> map)throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param map	channel/title/content
	 * @return	取得后台内容
	 * @throws AppBusinessException
	 */
	List<Content> getBackContent(Map<String, Object> map)throws AppBusinessException;
	//取得后台内容总条数
	Integer getBackContentCount(Map<String, Object> map)throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param map
	 * 根据条件查询存在多少条
	 * @throws AppBusinessException
	 */
	Integer getContentExists(Map<String, Object> map)throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param id	内容ID
	 * @return	通过ID取得某条内容
	 * @throws AppBusinessException
	 */
	Content getContentById(String id)throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param map	栏目标识/条数
	 * @return	根据栏目取得内容(在前台展示)
	 * @throws AppBusinessException
	 */
	List<Content> getContentByChannel(Map<String, Object> map)throws AppBusinessException;
	Integer getContentByChannelCount(Map<String, Object> map)throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param map	频道ID/条数
	 * @return	查询推送的门票
	 * @throws AppBusinessException
	 */
	List<Content> getTicketByChannel(Map<String, Object> map)throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param map	频道ID/条数
	 * @return	查询推送的酒店
	 * @throws AppBusinessException
	 */
	List<Content> getHotelByChannel(Map<String, Object> map)throws AppBusinessException;
	
	/**
	 * author BruceZhang
	 * @param map	频道ID/条数
	 * @return	查询推送的产品
	 * @throws AppBusinessException
	 */
	List<Content> getProductByChannel(Map<String, Object> map)throws AppBusinessException;
	
	/**
	 * author BruceZhang
	 * @param map	频道ID/条数
	 * @return	查询推送的景区
	 * @throws AppBusinessException
	 */
	List<Content> getScenicByChannel(Map<String, Object> map)throws AppBusinessException;
	
	/**
	 * author BruceZhang
	 * @param map	频道ID/条数
	 * @return	查询推送的点评
	 * @throws AppBusinessException
	 */
	List<Content> getDiscussByChannel(Map<String, Object> map)throws AppBusinessException;
	
	/**
	 * author BruceZhang
	 * @param map	频道ID/条数
	 * @return	查询推送的行程
	 * @throws AppBusinessException
	 */
	List<Content> getTripByChannel(Map<String, Object> map)throws AppBusinessException;
	
	/**
	 * 搜索频道内容表
	 * author grieous
	 * @param map
	 * @return
	 * @throws AppBusinessException
	 */
	public List<Content> getContent(Map<String, Object> map)throws AppBusinessException;
	public Integer getContentCount(Map<String, Object> map)throws AppBusinessException;
	
}
